package wifiunion.com.notice.adapter;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import wifiunion.com.notice.R;
import wifiunion.com.notice.RecyclerItemClick;


/**
 * Created by Administrator on 2017/4/24.
 */

public class RollerViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{


    public ImageView mBgIv;
    /**
     * 头像
     */
    public ImageView mHeaderIv;
    /**
     * 状态
     */
    public ImageView mStatusIv;
    /**
     * 名称
     */
    public TextView mNameTv;
    /**
     * 通知内容
     */
    public TextView mNoticeTv;
    /**
     * 体温
     */
    public TextView mTempTv;

    private RecyclerItemClick mItemClick;




    public ImageView mSefBgIv;
    /**
     * 头像
     */
    public ImageView mSefHeaderIv;
    /**
     * 状态
     */
    public ImageView mSefStatusIv;
    /**
     * 名称
     */
    public TextView mSefNameTv;
    /**
     * 通知内容
     */
    public TextView mSefNoticeTv;
    /**
     * 体温
     */
    public TextView mSefTempTv;





    /**
     *
     */
    private int position ;


    public RelativeLayout timeRl;

    public TextView firstTv,lastTv/*,currentTv*/;

    public RelativeLayout seftimeRl;

    public TextView seffirstTv,seflastTv/*,currentTv*/;


    public ImageView mUpIv;

    public ImageView mDownIv;

    public View defvv;
    public View sefvv;


    public RollerViewHolder(View itemView,RecyclerItemClick itemClick) {
        super(itemView);
        mBgIv= (ImageView) itemView.findViewById(R.id.bg_iv);
        mHeaderIv = (ImageView) itemView.findViewById(R.id.header_iv);
        mStatusIv = (ImageView) itemView.findViewById(R.id.status_iv);
        mNameTv = (TextView) itemView.findViewById(R.id.name_tv);
        mNoticeTv = (TextView) itemView.findViewById(R.id.notice_tv);
        mTempTv= (TextView) itemView.findViewById(R.id.temp_tv);

        mSefBgIv= (ImageView) itemView.findViewById(R.id.sef_bg_iv);
        mSefHeaderIv = (ImageView) itemView.findViewById(R.id.sef_header_iv);
        mSefStatusIv = (ImageView) itemView.findViewById(R.id.sef_status_iv);
        mSefNameTv = (TextView) itemView.findViewById(R.id.sef_name_tv);
        mSefNoticeTv = (TextView) itemView.findViewById(R.id.sef_notice_tv);
        mSefTempTv= (TextView) itemView.findViewById(R.id.sef_temp_tv);

        mItemClick = itemClick;
        itemView.setOnClickListener(this);
        mHeaderIv.setOnClickListener(this);



        timeRl = (RelativeLayout) itemView.findViewById(R.id.time_layout);
        firstTv = (TextView) itemView.findViewById(R.id.first_time_tv);
        lastTv = (TextView) itemView.findViewById(R.id.last_time_tv);

        seftimeRl = (RelativeLayout) itemView.findViewById(R.id.sef_time_layout);
        seffirstTv = (TextView) itemView.findViewById(R.id.sef_first_time_tv);
        seflastTv = (TextView) itemView.findViewById(R.id.sef_last_time_tv);


//        currentTv = (TextView) itemView.findViewById(R.id.current_time_tv);

        mUpIv = (ImageView) itemView.findViewById(R.id.sef_up_iv);

        mDownIv = (ImageView) itemView.findViewById(R.id.sef_down_iv);

        defvv = (View) itemView.findViewById(R.id.roll_def_rl);
        sefvv = (View) itemView.findViewById(R.id.roll_sef_rl);



    }

    @Override
    public void onClick(View v) {
        mItemClick.onItemClick(v,getAdapterPosition());
    }
}
